home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1996 June / EnigmA AMIGA RUN 08 (1996)(G.R. Edizioni)(IT)[!][issue 1996-06][EARSAN CD VII].iso / earcd / texts / hsc.lha / hsc / src_docs / features / if.hsc < prev    next >
Text File  |  1996-03-31  |  1KB  |  48 lines

  1. <WEBPAGE chapter="hsc - Features - " title="Conditional conversion"
  2.     PREV=":macro/macros.html"
  3.     NEXT=":macro/macros.html">
  4.  
  5. <H2>Syntax</H2>
  6.  
  7. Conditional conversion looks like that:
  8.  
  9. <PRE>
  10. <CODE><$IF</CODE> <I><A HREF="expressions.html">expression</A></I><CODE>></CODE>
  11.  
  12.   <I>...if part...</I>
  13.  
  14. [
  15. <CODE><$ELSE></CODE>
  16.  
  17.   <I>...optional else part...</I>
  18.  
  19. ]
  20.  
  21. <CODE></$IF></CODE>
  22. </PRE>
  23.  
  24. <H2>Example</H2>
  25.  
  26. <P>A good example for the usage of conditional conversion inside a macro is
  27. the <TG>WEBPAGE</TG> macro used to create the documentation for <hsc>.</P>
  28.  
  29. <P>It also shows how to create a navigation bar with optional references to
  30. a next and previous page.</P>
  31.  
  32. <PRE>
  33. <$include file="inc/webpage.hsc" SOURCE>
  34. </PRE>
  35.  
  36. <H2>Notes</H2>
  37.  
  38. <P><TG>$IF ..</TG> is nestable.</P>
  39.  
  40. <P>You can't compare <hsc>'s <TG>$IF ..</TG> to <CODE>#if</CODE>
  41. of the C-preprocessor. The main difference is that you can use <TG>$IF ..</TG>
  42. inside macros and that expressions are recalculated for every new
  43. call of the macro.</P>
  44.  
  45. </WEBPAGE>
  46.  
  47.  
  48.